<?php


class  Model_DbTable_Apos_Paytype extends Zend_Db_Table_Abstract {

	public function getPaytype($idPaytype){
		
		$whereStr = "PTYPE = {$idPaytype}";
		
		$row = $this->fetchRow($whereStr);
		
		if(!$row) return false;
		return $row['DESCRIPT'];
	}
	
	public function listAll(){
		
		$rows = $this->fetchAll("PTYPE > 0 ","PTYPE");
		
		$arrRes = array();
		foreach($rows as $k => $v){
			$arrRes[$v['PTYPE']] = $v['DESCRIPT'];
		}
		
		return $arrRes;
	}
}

?>